package empty.files;

import java.io.Serializable;
import java.util.Objects;

public class MyFile implements Serializable {
    private int id;
    private String name;
    private int father;
    private String type;
    private String create_time;
    private int create_user;

    public MyFile() {
    }

    public MyFile(int id, String name, int father, String type, String create_time, int create_user) {
        this.id = id;
        this.name = name;
        this.father = father;
        this.type = type;
        this.create_time = create_time;
        this.create_user = create_user;
    }

    public MyFile(String name, int father, String type, String create_time, int create_user) {
        this.name = name;
        this.father = father;
        this.type = type;
        this.create_time = create_time;
        this.create_user = create_user;
    }

    public MyFile(String name, String create_time, int create_user) {
        this.name = name;
        this.create_time = create_time;
        this.create_user = create_user;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getFather() {
        return father;
    }

    public void setFather(int father) {
        this.father = father;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public int getCreate_user() {
        return create_user;
    }

    public void setCreate_user(int create_user) {
        this.create_user = create_user;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MyFile myFile = (MyFile) o;
        return id == myFile.id && create_user == myFile.create_user && Objects.equals(name, myFile.name) && Objects.equals(father, myFile.father) && Objects.equals(type, myFile.type) && Objects.equals(create_time, myFile.create_time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, father, type, create_time, create_user);
    }

    @Override
    public String toString() {
        return "File{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", father=" + father +
                ", type='" + type + '\'' +
                ", create_time='" + create_time + '\'' +
                ", create_user=" + create_user +
                '}';
    }
}
